#include <stdarg.h>
#include <uuid/uuid.h>

#define NIT_SHORT_NAMES
#include <nit/macros.h>
#include <nit/palloc.h>
#include <nit/list.h>

#include "des.h"
#include "cell.h"
#include "pur.h"
#include "frm.h"
#include "fld.h"

Inb_fld *
inb_fld_new(uuid_t id, Inb_frm *frm, Inb_pur *pur)
{
	Inb_fld *fld;
	Inb_des *des = inb_palloc(fld);

	pcheck(des, NULL);
	des->type = FLD;
	fld = inb_thing(des);
	id ? uuid_copy(fld->id, id) : uuid_generate(fld->id);
	fld->frm = frm;
	fld->pur = pur;
	return fld;
}
